<?php
/* @var $this ProjekteController */
/* @var $model Projekte */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'projekte-form',
	'enableAjaxValidation'=>true,
	'enableClientValidation'=>true,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'projekt_nr'); ?>
		<?php echo $form->textField($model,'projekt_nr',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'projekt_nr'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'projekt_name'); ?>
		<?php echo $form->textField($model,'projekt_name',array('size'=>60,'maxlength'=>250)); ?>
		<?php echo $form->error($model,'projekt_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'projekt_name_kurz'); ?>
		<?php echo $form->textField($model,'projekt_name_kurz',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'projekt_name_kurz'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'fkz'); ?>
		<?php echo $form->textField($model,'fkz',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'fkz'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'projekt_start'); ?>
		<?php echo $form->textField($model,'projekt_start'); ?>
		<?php echo $form->error($model,'projekt_start'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'projekt_ende'); ?>
		<?php echo $form->textField($model,'projekt_ende'); ?>
		<?php echo $form->error($model,'projekt_ende'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'projekt_dauer'); ?>
		<?php echo $form->textField($model,'projekt_dauer'); ?>
		<?php echo $form->error($model,'projekt_dauer'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'bew_jahr'); ?>
		<?php echo $form->textField($model,'bew_jahr',array('size'=>4,'maxlength'=>4)); ?>
		<?php echo $form->error($model,'bew_jahr'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'antrags_jahr'); ?>
		<?php echo $form->textField($model,'antrags_jahr',array('size'=>4,'maxlength'=>4)); ?>
		<?php echo $form->error($model,'antrags_jahr'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'status_id'); ?>
		<?php echo $form->textField($model,'status_id'); ?>
		<?php echo $form->error($model,'status_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'stufe_id'); ?>
		<?php echo $form->textField($model,'stufe_id'); ?>
		<?php echo $form->error($model,'stufe_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'kategorie_id'); ?>
		<?php echo $form->dropDownList($model,'kategorie_id',CHtml::listData(MittelgeberKategorie::model()->findAll(),'kategorie_id','kategorie_name'), array(
			'ajax' => array('type'=>'POST', 'url'=>CController::createUrl('projekte/dynamicMittelgeber'),'dataType'=>'json',
			'data'=>array('kategorie_id'=>'js:this.value'), //url to call.
			//Style: CController::createUrl('currentController/methodToCall')
			//'update'=>'#mittelgeber_id',
			'success'=>'function(data){ $("#mittelgeber_id").html(data.dropDownMittelgeber);}'
    		 )));?>
			
		<?php /*echo $form->error($model,'kategorie_id'); */?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'mittelgeber_id'); ?>
		<?php echo CHtml::dropDownList('mittelgeber_id','',CHtml::listData(Mittelgeber::model()->findAll('kategorie_id=:my_kategorie_id',array('my_kategorie_id'=>(int)$model->kategorie_id)),'mittelgeber_id','mittelgeber_name') );
		?>
		<?php echo $form->error($model,'mittelgeber_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'programm_id'); ?>
		<?php echo $form->textField($model,'programm_id'); ?>
		<?php echo $form->error($model,'programm_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unterprogramm_id'); ?>
		<?php echo $form->textField($model,'unterprogramm_id'); ?>
		<?php echo $form->error($model,'unterprogramm_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'teilnehmer_status'); ?>
		<?php echo $form->textField($model,'teilnehmer_status'); ?>
		<?php echo $form->error($model,'teilnehmer_status'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'notiz'); ?>
		<?php echo $form->textArea($model,'notiz',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'notiz'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'buro_nr_1'); ?>
		<?php echo $form->textField($model,'buro_nr_1',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'buro_nr_1'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'buro_nr_2'); ?>
		<?php echo $form->textField($model,'buro_nr_2',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'buro_nr_2'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'buro_nr_3'); ?>
		<?php echo $form->textField($model,'buro_nr_3',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'buro_nr_3'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'projekt_summe'); ?>
		<?php echo $form->textField($model,'projekt_summe'); ?>
		<?php echo $form->error($model,'projekt_summe'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'fsu_summe'); ?>
		<?php echo $form->textField($model,'fsu_summe'); ?>
		<?php echo $form->error($model,'fsu_summe'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'projekt_summe_fsu'); ?>
		<?php echo $form->textField($model,'projekt_summe_fsu'); ?>
		<?php echo $form->error($model,'projekt_summe_fsu'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'fordersummer_fsu'); ?>
		<?php echo $form->textField($model,'fordersummer_fsu'); ?>
		<?php echo $form->error($model,'fordersummer_fsu'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'overhead'); ?>
		<?php echo $form->textField($model,'overhead'); ?>
		<?php echo $form->error($model,'overhead'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'korrdinator_summe'); ?>
		<?php echo $form->textField($model,'korrdinator_summe'); ?>
		<?php echo $form->error($model,'korrdinator_summe'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'internet'); ?>
		<?php echo $form->textArea($model,'internet',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'internet'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'intranet'); ?>
		<?php echo $form->textArea($model,'intranet',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'intranet'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'formc1'); ?>
		<?php echo $form->textField($model,'formc1'); ?>
		<?php echo $form->error($model,'formc1'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'formc2'); ?>
		<?php echo $form->textField($model,'formc2'); ?>
		<?php echo $form->error($model,'formc2'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'formc3'); ?>
		<?php echo $form->textField($model,'formc3'); ?>
		<?php echo $form->error($model,'formc3'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'formc4'); ?>
		<?php echo $form->textField($model,'formc4'); ?>
		<?php echo $form->error($model,'formc4'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'patent'); ?>
		<?php echo $form->textField($model,'patent',array('size'=>4,'maxlength'=>4)); ?>
		<?php echo $form->error($model,'patent'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'betreuer_kategorie'); ?>
		<?php echo $form->textField($model,'betreuer_kategorie'); ?>
		<?php echo $form->error($model,'betreuer_kategorie'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'kostenstelle'); ?>
		<?php echo $form->textField($model,'kostenstelle',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'kostenstelle'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'projekttr'); ?>
		<?php echo $form->textField($model,'projekttr',array('size'=>60,'maxlength'=>150)); ?>
		<?php echo $form->error($model,'projekttr'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'eingabedatum'); ?>
		<?php echo $form->textField($model,'eingabedatum'); ?>
		<?php echo $form->error($model,'eingabedatum'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'eingabeperson'); ?>
		<?php echo $form->textField($model,'eingabeperson',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'eingabeperson'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'vertrag'); ?>
		<?php echo $form->textField($model,'vertrag',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'vertrag'); ?>
	</div>

	

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->